<template>
  <div class="addModel">

    <Row :gutter="16" style="margin-bottom:10px">
       <Col span="6">出库单号：{{data.id}}</Col>
       <Col span="6">制单时间：{{data.createTime}}</Col>
       <Col span="6">出库方式：{{data.type}}</Col>
       <Col span="6">取药人：{{data.taker}}</Col>
    </Row>
    <!-- <Row :gutter="16" style="margin-bottom:10px">
       <Col span="6">备注：{{data.remark}}</Col>
       <Col span="6">制单人：{{data.username}}</Col>
    </Row> -->
    <Row :gutter="16">
      <i-table ref="table" border :content="self" :columns="columns" :data="data.list"></i-table>
    </Row>

  </div>
</template>

<script>
import hourse from "./../../api/hourse.js";
export default {
  name: "addModel",
  props:['data'],
  data() {
    return {
      self: this,
      columns: [
        {
          title: "序号",
          key: "id"
        },
        {
          title: "商品名称",
          key: "name"
        },
        {
          title: "单位",
          key: "unit"
        },
        {
          title: "零售价(￥)",
          key: "sellPrice"
        },
        {
          title: "成本价(￥)",
          key: "costPrice",
        },
        {
          title: "成本合计(￥)",
          key: "price",
          render: (h, { row }) => h("p", (row.num * row.costPrice).toFixed(2))
        },
        {
          title: "生产厂商",
          key: "provider"
        },
        {
          title: "出库数量",
          key: "outputNum"
        },
        {
          title: "当前库存",
          key: "num",
        },
      ]
    };
  },
  methods: {
  }
};
</script>

<style lang="less" scoped>
.addModel {
  .from {
    .item {
      margin-right: 15px;
    }
  }
}
</style>
